export default {
  namespaced: true,
  state () {
    return {
      illnessInfo: JSON.parse(localStorage.getItem('illnessInfo')) || {
        message: '', // 病情描述
        illnessTime: '', // 患病时间
        seeDoctor: '' // 是否就诊过
      },
      illnessType: 0, // 极速问诊级别：0普通1三甲
      depId: '', // 选择的科室id
      pictures: [] // 上传的图片
    }
  },
  mutations: {
    setIllnessInfo (state, illness) {
      state.illnessInfo = illness
      localStorage.setItem('illnessInfo', JSON.stringify(illness))
    },
    setIllnessType (state, num) {
      state.illnessType = num
    },
    setDepId (state, id) {
      state.depId = id
    },
    setPictures (state, Picture) {
      state.pictures = Picture
    }
  }
}
